const { SyncWaterfallHook } = require('tapable');

let hook = new SyncWaterfallHook(['name', 'age']);

hook.tap('fn1', function (name, age) {
  console.log('fn1:', name, age)
  return '1111'
})
hook.tap('fn2', function (name, age) {
  console.log('fn2:', name, age)
  return '2222'
})
hook.tap('fn3', function (name, age) {
  console.log('fn3:', name, age)
  return '3333'
})

hook.call('abc', 123)